vchiq_arm: Add completion records under the mutex
authorPhil Elwell <phil@raspberrypi.org>
Thu, 21 Apr 2016 12:49:32 +0000 (13:49 +0100)
committerpopcornmix <popcornmix@gmail.com>
Mon, 20 Feb 2017 20:28:33 +0000 (20:28 +0000)
commitd99e8fa79d8614edb893b5d39831bf616d1846b5
treec3b84220331e75c76fe987f0820374a77cddb1c1
parent203d8a59ae03077b6eff895b3c9fe0f303904324
vchiq_arm: Add completion records under the mutex

An issue was observed when flushing openmax components
which generate a large number of messages returning
buffers to host.

We occasionally found a duplicate message from 16
messages prior, resulting in a buffer returned twice.

While only one thread adds completions, without the
mutex you don't get the protection of the automatic
memory barrier you get with synchronisation objects.

Signed-off-by: Phil Elwell <phil@raspberrypi.org>
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c